package model.inventory;
// Generated Oct 27, 2012 8:43:23 AM by Hibernate Tools 3.2.1.GA


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MstHadiahStok generated by hbm2java
 */
@Entity
@Table(name="mst_hadiah_stok"
    ,schema="inventory"
)
public class HadiahStok  implements java.io.Serializable {


     private HadiahStokId id;
     private Hadiah mstHadiah;
     private BigDecimal stok;

    public HadiahStok() {
    }

	
    public HadiahStok(HadiahStokId id, Hadiah mstHadiah) {
        this.id = id;
        this.mstHadiah = mstHadiah;
    }
    public HadiahStok(HadiahStokId id, Hadiah mstHadiah, BigDecimal stok) {
       this.id = id;
       this.mstHadiah = mstHadiah;
       this.stok = stok;
    }
   
     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="hadiahId", column=@Column(name="hadiah_id", nullable=false) ), 
        @AttributeOverride(name="gudangId", column=@Column(name="gudang_id", nullable=false) ) } )
    public HadiahStokId getId() {
        return this.id;
    }
    
    public void setId(HadiahStokId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="hadiah_id", nullable=false, insertable=false, updatable=false)
    public Hadiah getMstHadiah() {
        return this.mstHadiah;
    }
    
    public void setMstHadiah(Hadiah mstHadiah) {
        this.mstHadiah = mstHadiah;
    }
    
    @Column(name="stok", precision=12)
    public BigDecimal getStok() {
        return this.stok;
    }
    
    public void setStok(BigDecimal stok) {
        this.stok = stok;
    }




}


